﻿// Decompiled with JetBrains decompiler
// Type: UnityEngine.Rendering.SortingGroup
// Assembly: UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: E6AE6B5A-2752-4B07-9528-C8B77C62CE79
// Assembly location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.dll
// XML documentation location: C:\Users\windys\Unity\2021.3.39f1c1\Editor\Data\Managed\UnityEngine\UnityEngine.CoreModule.xml

using System.Runtime.CompilerServices;
using UnityEngine.Bindings;

#nullable disable
namespace UnityEngine.Rendering
{
  /// <summary>
  ///   <para>Adding a SortingGroup component to a GameObject will ensure that all Renderers within the GameObject's descendants will be sorted and rendered together.</para>
  /// </summary>
  [NativeType(Header = "Runtime/2D/Sorting/SortingGroup.h")]
  [RequireComponent(typeof (Transform))]
  public sealed class SortingGroup : Behaviour
  {
    [StaticAccessor("SortingGroup", StaticAccessorType.DoubleColon)]
    internal static extern int invalidSortingGroupID { [MethodImpl(MethodImplOptions.InternalCall)] get; }

    /// <summary>
    ///   <para>Updates all Sorting Group immediately.</para>
    /// </summary>
    [StaticAccessor("SortingGroup", StaticAccessorType.DoubleColon)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern void UpdateAllSortingGroups();

    [StaticAccessor("SortingGroup", StaticAccessorType.DoubleColon)]
    [MethodImpl(MethodImplOptions.InternalCall)]
    internal static extern SortingGroup GetSortingGroupByIndex(int index);

    /// <summary>
    ///   <para>Name of the Renderer's sorting layer.</para>
    /// </summary>
    public extern string sortingLayerName { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    /// <summary>
    ///   <para>Unique ID of the Renderer's sorting layer.</para>
    /// </summary>
    public extern int sortingLayerID { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    /// <summary>
    ///   <para>Renderer's order within a sorting layer.</para>
    /// </summary>
    public extern int sortingOrder { [MethodImpl(MethodImplOptions.InternalCall)] get; [MethodImpl(MethodImplOptions.InternalCall)] set; }

    internal extern int sortingGroupID { [MethodImpl(MethodImplOptions.InternalCall)] get; }

    internal extern int sortingGroupOrder { [MethodImpl(MethodImplOptions.InternalCall)] get; }

    internal extern int index { [MethodImpl(MethodImplOptions.InternalCall)] get; }
  }
}
